package cz.data.gateway.model.dto;

import cz.data.gateway.model.dto.FilterDefinitionDto;
import cz.data.gateway.model.dto.PredicateDefinitionDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.util.ArrayList;
import java.util.List;

@Getter
@Setter
@ApiModel
public class GatewayRouteForm {

    @ApiModelProperty(value = "记录ID")
    private String id;
    @NotBlank(message = "路由id不能为空")
    @ApiModelProperty(value = "网关路由id")
    private String routeId;
    @NotBlank(message = "uri不能为空")
    @ApiModelProperty(value = "网关uri")
    private String uri;
    @ApiModelProperty(value = "网关路由描述信息")
    private String description;
    @NotEmpty(message = "网关断言不能为空")
    @ApiModelProperty(value = "网关断言")
    private List<PredicateDefinitionDto> predicates = new ArrayList<>();
    @ApiModelProperty(value = "网关过滤器信息")
    private List<FilterDefinitionDto> filters = new ArrayList<>();
    @ApiModelProperty(value = "排序")
    private Integer orders = 0;
    @ApiModelProperty(value = "状态")
    private String status;
    @ApiModelProperty(value = "备注")
    private String remark;
}
